package wizard;

import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Layout;

public class DirectoryPage extends WizardPage 
{

	public static final String PAGE_NAME = "Directory";
	Button button = null;
	
	
	public DirectoryPage() 
	{
		super(PAGE_NAME, "DirectoryPage" , null);
		
	}
	
	
	
	
	
	@Override
	public void createControl(Composite parent) 
	{
		Composite composite = null;
		
		Layout layout = null;
		
		Label label = null;

		
		try 
		{
			composite = new Composite(parent, SWT.NONE);
			
			layout = new GridLayout(2, false);
			composite.setLayout(layout);
			
			label = new Label(composite, SWT.CENTER);
			label.setText("Use Default");
			
			this.button = new Button(composite, SWT.CHECK);
			
			this.setControl(composite);
			this.setPageComplete(true);
			
			
			
		} 
		catch (Exception e) 
		{
			e.printStackTrace();
		}
		

	}
	
	public boolean useDefault()
	{
		return button.getSelection();
	}

}
